
// The number of mission files in the directory
// 0: None
// -1: automatic check
// >0: known number, won't check over this number.
d_mission_file_count = 20;

// The base timeout for the a conquered place to be considered conquered.
// Actually it is randomized between the value and 1,5*value
d_mission_conquered_base_timeout = 25;

if (isnil "d_mission_debug_messages") then {
	d_mission_debug_messages = false;
};

if (isnil "d_mission_own_flag") then {
	d_mission_own_flag = "FlagCarrierINS";
	switch (CurrentWorld) do {
		case "cla\clafghan\clafghan.wrp":
		{
			d_mission_own_flag = switch (d_own_side) do {
				case "WEST": {"FlagCarrierUSA"};
				case "EAST": {"FlagCarrierTakistan_EP1"};
				case "GUER": {"FlagCarrierTKMilitia_EP1"};
				default {"FlagCarrierTakistan_EP1"};
			};
		};
		default
		{
			d_mission_own_flag = switch (d_own_side) do {
				case "WEST": {"FlagCarrierUSA"};
				case "EAST": {"FlagCarrierRU"};
				case "GUER": {"FlagCarrierGUE"};
				default {"FlagCarrierINS"};
			};
		};
	};
};
if (isnil "d_mission_own_flag_texture") then {
	d_mission_own_flag_texture = "\ca\data\Flag_napa_co.paa";
	switch (CurrentWorld) do {
		case "cla\clafghan\clafghan.wrp":
		{
			d_mission_own_flag_texture = switch (d_own_side) do {
				case "WEST": {"\ca\data\Flag_usa_co.paa"};
				case "EAST": {"\ca\ca_e\data\flag_tka_co.paa"};
				case "GUER": {"\ca\ca_e\data\flag_tkm_co.paa"};
				default {"\ca\ca_e\data\flag_tkg_co.paa"};
			};
		};
		default
		{
			d_mission_own_flag_texture = switch (d_own_side) do {
				case "WEST": {"\ca\data\Flag_usa_co.paa"};
				case "EAST": {"\ca\data\Flag_rus_co.paa"};
				case "GUER": {"\ca\data\Flag_napa_co.paa"};
				default {"\ca\data\Flag_napa_co.paa"};
			};
		};
	};
};

if (isnil "d_mission_enemy_flag") then {
	d_mission_enemy_flag = "FlagCarrierINS";
	switch (CurrentWorld) do {
		case "cla\clafghan\clafghan.wrp":
		{
			d_mission_enemy_flag = switch (d_enemy_side) do {
				case "WEST": {"FlagCarrierUSA"};
				case "EAST": {"FlagCarrierTakistan_EP1"};
				case "GUER": {"FlagCarrierTKMilitia_EP1"};
				default {"FlagCarrierTakistan_EP1"};
			};
		};
		default
		{
			d_mission_enemy_flag = switch (d_enemy_side) do {
				case "WEST": {"FlagCarrierUSA"};
				case "EAST": {"FlagCarrierRU"};
				case "GUER": {"FlagCarrierGUE"};
				default {"FlagCarrierINS"};
			};
		};
	};
};
if (isnil "d_mission_enemy_flag_texture") then {
	d_mission_enemy_flag_texture = "\ca\data\Flag_rus_co.paa";
	switch (CurrentWorld) do {
		case "cla\clafghan\clafghan.wrp":
		{
			d_mission_enemy_flag_texture = switch (d_enemy_side) do {
				case "WEST": {"\ca\data\Flag_usa_co.paa"};
				case "EAST": {"\ca\ca_e\data\flag_tka_co.paa"};
				case "GUER": {"\ca\ca_e\data\flag_tkm_co.paa"};
				default {"\ca\ca_e\data\flag_tkg_co.paa"};
			};
		};
		default
		{
			d_mission_enemy_flag_texture = switch (d_enemy_side) do {
				case "WEST": {"\ca\data\Flag_usa_co.paa"};
				case "EAST": {"\ca\data\Flag_rus_co.paa"};
				case "GUER": {"\ca\data\Flag_napa_co.paa"};
				default {"\ca\data\Flag_napa_co.paa"};
			};
		};
	};
};
